package services

import (
	"go/dao"
	"go/models"
)

func Addfamily(family models.Familytree) error {
	err := dao.Addfamily(family)
	return err
}

func Delfamily(id int) error {
	err := dao.Delfamily(id)
	return err
}

func Updatefamily(family models.Familytree) error {
	err := dao.Updatefamily(family)
	return err
}

func Getfamily(familyParam map[string]interface{}) ([]models.Familytree, int64, error) {
	familyData, total, err := dao.Getfamily(familyParam)
	return familyData, total, err
}
